home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / bootslow.zip / SOURCE.ZIP / WHIRR.ASM < prev   
Assembly Source File  |  1991-08-06  |  2KB  |  85 lines

  1. ;
  2. ;; SlowDown for self-booting software
  3. ;;
  4. ;; BOOTSLOW
  5. ;;
  6. ;; Copyright 1991 Alexander R. Pruss
  7. ;;
  8. ;; May be freely distributed, modified and used provided that no copyright
  9. ;; messages are removed, and this sentence together with the next two are
  10. ;; always included in unmodified form.  If you like this program a lot, you are
  11. ;; invited to show your appreciation by making a tax-deductible donation to
  12. ;; the Pro-Life or Anti-Abortion movement, but are under no obligation, moral
  13. ;; or otherwise to do so (especially if you disagree with the goals of this
  14. ;; movement.)  There is no warranty; use at own risk.
  15. ;
  16.     include macros.inc
  17. c segment
  18.     org 100h
  19. BEGIN:
  20.     assume CS:c,DS:c,ES:c
  21.     push ds
  22.     pop es
  23.  
  24.     Puts copyright
  25.  
  26.     Puts drive_q1
  27. LoopTop:
  28.     Puts drive_q2
  29. g:
  30.     DOSGetch
  31.     cmp al,01bh
  32.     jz Abort
  33.     cmp al,'a'
  34.     jb Physical
  35. ;
  36. ; Whirr a logical drive
  37. ;
  38.     sub al,'a'
  39.     mov bx,offset bootsec
  40.     mov cx,1
  41.     Clear dx
  42.     int 25h
  43.     jc diskerror
  44.     jmp LoopTop
  45. ;
  46. ; Whirr a physical drive
  47. ;
  48. Physical:
  49.     sub al,'A'
  50.     mov dl,al
  51.  
  52.     mov ax,0201h
  53.     mov cx,0001h
  54.     Clear dh
  55.     mov bx,offset bootsec
  56.     int 13h
  57.     jnc LoopTop
  58.  
  59. diskerror:
  60.     Puts i13error
  61.     jmp LoopTop
  62.  
  63. Abort:
  64.     Puts done
  65.     mov ax,4c00h
  66.     int 21h
  67.  
  68. _puts proc near
  69.     mov bx,1
  70.     mov dx,si
  71.     mov ah,WriteHandle
  72.     int 21h
  73.     ret
  74. _puts endp
  75.  
  76. String copyright, <'Disk Whirr Program.', CR,LF, '(C) Copyright 1991 Alexander Pruss', CR,LF>
  77. String drive_q1, <'Press an upper case letter to whirr a physical floppy, or a lower case letter', CR,LF, 'to whirr a DOS drive.', CR,LF>
  78. String drive_q2, <'Press A,B,..., or a,b,c,..., or ESC to abort.', CR,LF>
  79. String i13error, <'Disk error.',CR,LF>
  80. String done, <'Done!',CR,LF>
  81. bootsec:
  82.  
  83. c ends
  84. end BEGIN
  85.